package com.fj.order.feign;

import com.fj.domain.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author fj
 * @date 2024/3/15 10:07
 */
@FeignClient(value = "shop-user", path = "user")
public interface UserService {
    @RequestMapping(value = "/{uid}",method = RequestMethod.GET)
    User getUser(@PathVariable("uid") Integer uid);

    @RequestMapping(value = "reduceMoney",method = RequestMethod.POST)
    User reduceMoney(@RequestParam("uid") Integer uid, @RequestParam("money") Integer money);
}
